module.exports = {
  publicPath: './',
  outputDir: 'dist',
  lintOnSave: true,
  chainWebpack: (config) => {
    config.output.filename('[name].js')
    // config.entry('./src/index.js').output.filename('[name].js')
  },
  configureWebpack: (config) => {
    if (process.env.NODE_ENV === 'production') {
      config.optimization.minimizer[0].options.terserOptions.compress['drop_console'] = true
      // config.optimization.minimizer[0].options.uglifyOptions.compress['drop_console'] = true
    } else {
    }
  },
  productionSourceMap: false,
  css: {
    extract: process.env.NODE_ENV !== 'production',
    // extract: false,
    sourceMap: false,
    // css预设器配置项
    loaderOptions: {},
    modules: false
  },
  parallel: require('os').cpus().length > 1,
  // 第三方插件配置
  pluginOptions: {}
}
